#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(sample, 0.0.1, mgc521@linuxone.co.kr)
AM_INIT_AUTOMAKE(sample, 0.0.1)
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_MAKE_SET
#AC_PROG_RANLIB
AC_PROG_LIBTOOL

OBJS_CXXFLAGS="$CXXFLAGS `pkg-config sigc++-2.0 --cflags`"
AC_SUBST(OBJS_CXXFLAGS)
CXXFLAGS="$CXXFLAGS `pkg-config sigc++-2.0 --libs --cflags`"
CXXLIBS="$CXXLIBS"
AC_SUBST(CXXFLAGS)

#AC_SUBST([CXXFLAGS])

# Checks for libraries.
# FIXME: Replace `main' with a function in `-ldev':
AC_CHECK_LIB([dev], [Open])
AC_CHECK_LIB([control], [Open])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([ltdl.h fcntl.h stdlib.h string.h termios.h unistd.h usb.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([bzero])

AC_CONFIG_FILES([Makefile
                 devices/Makefile
                 src/CashDrawer/Makefile
                 src/LineDisplay/Makefile
                 src/MSR/Makefile
                 src/Makefile
                 src/POSPrinter/Makefile
                 src/Scanner/Makefile
                 src/SignatureCapture/Makefile])
AC_OUTPUT
